package com.baiye.www.spring.aop.factory;

import com.baiye.www.spring.aop.AdvisedSupport;
import com.baiye.www.spring.aop.aopProxy.AopProxy;
import com.baiye.www.spring.aop.aopProxy.JdkDynamicAopProxy;

/**
 * @author baiye
 * @version 1.0
 * @date 2021/12/12 14:54
 */
public class ProxyFactory extends AdvisedSupport implements AopProxy {

    @Override
    public Object getProxy() {
        return createAopProxy().getProxy();
    }

    private AopProxy createAopProxy() {
        return new JdkDynamicAopProxy(this);
    }
}
